const fs = require("fs");

fs.readFile("./a.txt", "utf8", function(err, data) {

	if(!err) {
		console.log(data);
		console.log(data.toString());
	}
});

fs.writeFile("./b.txt", "my name is ghy", {flag: "w"}, function(err){
	if(!err) {
		console.log("写入成功");
	}
});